let { majorModel } = require('../models/majorModel');
//新增专业
module.exports.createMajor = async function(req, res) {
        const data = req.body;
        await majorModel.create(data);
        res.send({
            message: '新增专业成功！',
            code: 1

        })
    }
    //渲染专业
module.exports.getMajor = async function(req, res) {
    const result = await majorModel.find();
    res.send({
        message: '获取专业数据成功',
        code: 1,
        result

    })
}